﻿@model DBMS.Models.Table

@{
    ViewBag.Title = "EditTable";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Rename Table</h2>

@using (Html.BeginForm("EditTable", "Tables"))
{
    int databaseId = ViewBag.Database.Index;
    
    @Html.HiddenFor(m => m.Index);
    
    @Html.Hidden("databaseId", databaseId);
    
    @Html.ValidationSummary(true)
    <fieldset>
        <div class="editor-label"> 
            <div>@Html.LabelFor(m => m.Name)</div>
        </div>
        <div class="editor-field">
            <div>@Html.TextBoxFor(m => m.Name)</div>
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}